//package com.example.basic.utils
//
//import android.app.ActivityManager
//import android.content.Context
//import android.content.Context.ACTIVITY_SERVICE
//import android.os.Process
//
//fun isMainProcess(context: Context): Boolean {
//    val pid = Process.myPid()
//    val activityManager = context.getSystemService(ACTIVITY_SERVICE) as ActivityManager
//    for (appProcess in activityManager.runningAppProcesses) {
//        if (appProcess.pid == pid) {
//            return context.applicationInfo.packageName == appProcess.processName
//        }
//    }
//    return false
//}
